import publicForm from "@/components/public/el-form.vue"; //弹框form
import TableData from '@/components/public/el-tables'; //列表
import formJs from "./regexDetail.js"; //新增弹框配置项

import {
    getConcreteCheckSampleByFid, //详情
    getBaseDepartmentUser, //选择人
    saveConcreteCheckSample, //新增
    saveConcreteCheckAduit, //审核
} from "@/api/request.js";
export default {
    props: [
        "dialogVisible",
        "dialogTitle",
        "statusNum",
        "currentRow",
        "tableTitle"
    ],
    // 
    data() {
        return {
            visible: "",

            btnShow: true,
            selecttTotalIdIndex: null,
            loading: false,
            surfaceList: null, //表面计算
            detectionList: null, //角度计算
            concretetypeList: null, //泵送混凝土
            concretetypeunList: null, //非泵送混凝土
            // 页签切换
            typeData: [{
                    text: "混凝土回弹检测记录表",
                    show: true
                },
                {
                    text: "混凝土回弹检测报告",
                    show: false
                },
                {
                    text: "审批流程",
                    show: false
                },
            ],
            totalData: null,
            reportConclusion: "改构件回弹强度推定值>50Mpa,符合设计图纸要求。",
            personList: null,
            perDisabled: false, //记录人、复核人
            sgDisabled: false, //施工单位是否可编辑
            jlDisabled: false, //监理单位是否可编辑
            contentTableLeftArr: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "Rm"],
            contentTableResult: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"],
            contentTableResultData: null,
            title: null,
            isLock: false,
            dialogHeight: null,
            activeIndex: "1",
            formObj: formJs.formObj,
            currntData: null,
            dataInfo: null,
            startDates: null,
            treeData: [], //材料种类
            currentDetail: null,
            recordTableObj: formJs.recordTableObj, // 回弹算法横表上
            reportTableObj: formJs.reportTableObj, // 报告上
            recordTableBottomObj: formJs.recordTableBottomObj, // 回弹算法下
            reportResultData: [{
                "fResult1": "",
                "fResult2": "",
                "fResult3": "",
                "fResult4": "",
                "fResult5": "",
                "fResult6": "",
                "fResult7": "",
                "fResult8": "",
                "fResult9": "",
                "fResult10": ""
            }, {
                "fResult1": "",
                "fResult2": "",
                "fResult3": "",
                "fResult4": "",
                "fResult5": "",
                "fResult6": "",
                "fResult7": "",
                "fResult8": "",
                "fResult9": "",
                "fResult10": ""
            }, {
                "fResult1": "",
                "fResult2": "",
                "fResult3": "",
                "fResult4": "",
                "fResult5": "",
                "fResult6": "",
                "fResult7": "",
                "fResult8": "",
                "fResult9": "",
                "fResult10": ""
            }, {
                "fResult1": "",
                "fResult2": "",
                "fResult3": "",
                "fResult4": "",
                "fResult5": "",
                "fResult6": "",
                "fResult7": "",
                "fResult8": "",
                "fResult9": "",
                "fResult10": ""
            }, {
                "fResult1": "",
                "fResult2": "",
                "fResult3": "",
                "fResult4": "",
                "fResult5": "",
                "fResult6": "",
                "fResult7": "",
                "fResult8": "",
                "fResult9": "",
                "fResult10": ""
            }, {
                "fResult1": "",
                "fResult2": "",
                "fResult3": "",
                "fResult4": "",
                "fResult5": "",
                "fResult6": "",
                "fResult7": "",
                "fResult8": "",
                "fResult9": "",
                "fResult10": ""
            }],
            reportTableBottomObj: formJs.reportTableBottomObj, // 报告中


            echartsData: null,
            formData: null,
            contentTableLeft: [],
            contentTableRight: [], //计算结果集合fParam 
            titleData: ['碳化深度', '角度修正值', '角度修正后回弹值', '检测面修正值', '浇筑面修正值', '强度换算值(MPa)'],

            // titleData: ['碳化深度', '角度修正值', '角度修正后回弹值', '检测面修正值', '浇筑面修正值', '测区混凝土换算强度(Mpa)'],
            reportData: ['测区平均值', '角度修正值', '角度修正后回弹值', '检测面修正值', '检测面修正后回弹值'],
            arrange: ['fResult1', 'fResult2', 'fResult3', 'fResult4', 'fResult5', 'fResult6', 'fResult7', 'fResult8', 'fResult9', 'fResult10'],
            carbonationData: formJs.carbonationData,
            jlformData: {
                fId: "", //传fid表示修改 不传表示新增
                userId: "", //当前登录人id
                userName: "", //当前登录人姓名
                fRecorddates: this.common.getDay(0), //记录时间
                fRecorduserid: "", //记录人id
                fRecordusername: "", //记录人姓名
                fCheckdates: this.common.getDay(0), //复核时间
                fCheckuserid: "", //复核人id
                fCheckusername: "", //复核人姓名
                fJlcheckdates: "", //监理审核时间
                fJlcheckuserid: "", //监理审核人id
                fJlcheckusername: "", //监理审核人姓名
                fJlchecknote: "", //监理审核意见
            },

            // 审批流程
            table_config: formJs.table_config, //列表
            queryCriteriaData: {}, //分页
            tableData: [],
            // 审批流程

        };
    },
    components: {
        publicForm,
        TableData,
    },
    watch: {
        dialogVisible: {
            handler(newVal) {
                if (newVal) {
                    this.visible = newVal;
                }
            },
            immediate: true,
        },
        dialogTitle: {
            handler(newVal) {
                if (newVal) {
                    this.title = newVal;
                }
            },
            immediate: true,
        },


        currentRow: {
            handler(newVal) {
                if (newVal) {
                    // 
                    this.currentDetail = newVal;

                    // if (newVal.fStatus == "待检测" || newVal.fStatus == "检测中") {
                    //     this.sgDisabled = false; //施工单位是否可编辑
                    //     this.jlDisabled = true; //监理单位是否可编辑
                    // }
                    this.getDetail({
                        fId: this.currentDetail.fId
                    })
                    this.getPerson(this.currentDetail.fCompanyid)

                }
            },
            immediate: true,
        },

    },
    created() {
        window.addEventListener("resize", this.getHeight);
        this.getHeight();
    }, //获取页面高度自适应：
    destroyed() {
        window.removeEventListener("resize", this.getHeight);
        this.getHeight();
    },
    mounted() {
        this.surfaceList = JSON.parse(sessionStorage.getItem("yjSmart-surfaceList")); //表面计算
        this.detectionList = JSON.parse(sessionStorage.getItem("yjSmart-detectionList")); //角度计算
        this.concretetypeList = JSON.parse(
            sessionStorage.getItem("yjSmart-concretetypeList")
        ); //泵送混凝土
        this.concretetypeunList = JSON.parse(
            sessionStorage.getItem("yjSmart-concretetypeunList")
        ); //非泵送混凝土  
        this.userInfo = JSON.parse(sessionStorage.getItem("yjSmart-userInfo"));
        // 监理审核人

        if (this.statusNum == 1) { //编辑
            this.btnShow = true;
            this.sgDisabled = false; //施工单位是否可编辑
            this.jlDisabled = true; //监理单位是否可编辑
        } else if (this.statusNum == 3) { //审核


            this.btnShow = true;
            this.sgDisabled = true; //施工单位是否可编辑
            this.jlDisabled = false; //监理单位是否可编辑
        } else if (this.statusNum == 7) {
            this.btnShow = false;
            this.perDisabled = true;
            this.typeData[0].show = false;
            this.typeData[1].show = true;
            this.typeData[2].show = false;
            this.sgDisabled = true; //施工单位是否可编辑
            this.jlDisabled = true; //监理单位是否可编辑
        } else if (this.statusNum == 8) {
            this.btnShow = false;
            this.perDisabled = true;
            this.typeData[0].show = true;
            this.typeData[1].show = false;
            this.typeData[2].show = false;
            this.sgDisabled = true; //施工单位是否可编辑
            this.jlDisabled = true; //监理单位是否可编辑
        }
        this.getHeight();
    },
    methods: {
        tableRowClassName({
            row,
            column,
            rowIndex,
            columnIndex
        }) {
            //把每一行的索引放进row,和index
            row.index = rowIndex;
            column.index = columnIndex;
        },
        // handleCellClick(row, column) {
        //     console.log(1111,row.index)
        //     console.log(2222,column.index)
        //     // this.$nextTick(() => {
        //     //     this.$refs.inputRef[0].focus();
        //     //   });
        // },
        moveFocus(event, row, column) {
            var text1
            if (event.code == "ArrowRight") {
                text1 = row + "fParam" + (column + 1);
                if (column < 16) {
                    this.$refs[text1][0].focus();
                }
            } else if (event.code == "ArrowLeft") {
                text1 = row + "fParam" + (column - 1);
                if (1 < column) {
                    this.$refs[text1][0].focus();
                }
            }
            // else if (event.code == "ArrowDown") {
            //   var text3 = "fParam" + key;
            //   if (index < 9) {
            //     this.$refs[text3][index + 1].focus();
            //   }
            // } else if (event.code == "ArrowUp") {
            //   var text4 = "fParam" + key;
            //   if (0 < index) {
            //     this.$refs[text4][index - 1].focus();
            //   }
            // }

            if (event.keyCode === 13) {
                // 回车
                if (column < 16) {
                    text1 = row + "fParam" + (column + 1);
                    this.$refs[text1][0].focus();
                } else if (column == 16) {
                    if (row < 9) {
                        column = 0;
                        column++;
                        text1 = (row + 1) + "fParam" + column;
                        this.$refs[text1][0].focus();
                    }
                }
            }

        },
        inputValue() {},

        getHeight() {
            var h = document.documentElement.clientHeight; //获取页面可见高度
            this.dialogHeight = h * 1 + "px";
        },
        handleSelect(key) {
            this.activeIndex = key;
        },
        closeDialog() {
            this.$emit("close");
        },
        // 页签切换
        changeType(e, index) {
            for (let i in this.typeData) {
                if (parseFloat(i) === index) {
                    this.typeData[i].show = true;
                } else {
                    this.typeData[i].show = false;
                }
            }
            // this.typeDataNum = index;
        },
        // 页签切换
        resetObject(obj) {
            return Object.assign({}, obj); // 创建一个新的空对象，然后将原始对象的属性赋值给这个新对象
        },

        // 调用 map() 函数，传入上面定义的 resetObject 函数作为参数

        // 详情
        getDetail(obj) {
            this.userInfo = JSON.parse(sessionStorage.getItem("yjSmart-userInfo"));
            this.loading = true;
            this.reportResultData.map((item) => this.resetObject(item));
            getConcreteCheckSampleByFid(obj).then((res) => {
                if (res.errcode == 0) {
                    this.loading = false;

                    var data = res.data.lrCheckConcreteSample;
                    console.log(data, 999);
                    this.totalData = res.data;
                    this.formData = res.data.lrCheckConcreteSample;
                    this.tableData = res.data.taskList;
                    this.contentTableLeft = data.checkConcretesampleitems; //测区
                    // checkConcretesampleitems  1左
                    // checkConcretesampleresult 2右
                    if (data.checkConcretesampleitems.length > 0) {
                        this.RmData = []
                        data.checkConcretesampleitems.map((item, index) => {
                            this.reportResultData[0]['fResult' + (index + 1)] = item.fParam17;
                            if (item.fParam17 != "") {
                                this.RmData.push(item.fParam17)
                            } else {
                                this.RmData.push(NaN)
                            }
                        })
                    }
                    if (data.checkConcretesampleresult.length > 0) {

                        this.reportResultData[1] = data.checkConcretesampleresult[1]
                        this.reportResultData[2] = data.checkConcretesampleresult[2]
                        this.reportResultData[3] = data.checkConcretesampleresult[3]
                        this.reportResultData[4] = data.checkConcretesampleresult[4]
                        this.reportResultData[5] = data.checkConcretesampleresult[5]

                    }
                    var totalData = [];
                    var checkname = [
                        "fParam1",
                        "fParam2",
                        "fParam3",
                        "fParam4",
                        "fParam5",
                        "fParam6",
                        "fParam7",
                        "fParam8",
                        "fParam9",
                        "fParam10",
                        "fParam11",
                        "fParam12",
                        "fParam13",
                        "fParam14",
                        "fParam15",
                        "fParam16",
                    ];
                    var alreadyData = []; //已填的测区
                    for (var i = 0; i < this.contentTableLeft.length; i++) {
                        for (var j = 0; j < checkname.length; j++) {
                            totalData.push(this.contentTableLeft[i].fId);
                            if (this.contentTableLeft[i][checkname[j]] != "") {
                                alreadyData.push(this.contentTableLeft[i].fId);
                            }
                        }
                    }

                    var totalId = []; //所有测区Id
                    this.contentTableLeft.map((item) => {
                        totalId.push(item.fId);
                    });
                    var totalIdIndex = []; //已填测区 index
                    totalId.map((item, index) => {
                        alreadyData.map((i) => {
                            if (item == i) {
                                totalIdIndex.push(index);
                            }
                        });
                    });
                    let newData = alreadyData.filter(
                        (item, index) => alreadyData.indexOf(item) === index
                    );

                    this.formData.fTestnum = newData.length; // 实测数量(测区)
                    this.reportTableBottomObj[1].key = newData.length; // 实测数量(测区)

                    this.selecttTotalIdIndex = totalIdIndex; //已填测区 index
                    // console.log(12,this.formData.fTestnum,this.selecttTotalIdIndex,alreadyData);
                    var blankData = [];
                    var rowData = []; //所有数据，不填补零
                    var realArr = []; //每行真实数据
                    for (var c = 0; c < this.contentTableLeft.length; c++) {
                        var rowDeatil = [];
                        var realData = []; //真实数据
                        for (var h = 0; h < checkname.length; h++) {
                            if (this.contentTableLeft[c][checkname[h]] != "") {
                                rowDeatil.push(this.contentTableLeft[c][checkname[h]]);
                                realData.push(this.contentTableLeft[c][checkname[h]]);
                            } else {
                                blankData.push(c);
                                rowDeatil.push("0");
                                // realData.push('0')
                            }
                        }

                        rowData.push({
                            data: rowDeatil,
                        });
                        realArr.push({
                            data: realData,
                        });
                    }

                    // 10个数，去掉三个最大数和三个最小数
                    var drawData = []; // 10个数，去掉三个最大数和三个最小数
                    for (var s = 0; s < realArr.length; s++) {
                        // // 数组对象排序
                        if (realArr[s].data.length == 16) {
                            var sortData = realArr[s].data.sort(function (a, b) {
                                return a - b;
                            });
                            drawData.push({
                                data: sortData.slice(3, 13),
                            });
                        } else {
                            drawData.push({
                                data: realArr[s].data,
                            });
                        }
                    }
                    // 10个数，去掉三个最大数和三个最小数
                    // //实测平均回弹值Rm数组
                    var angleNum = []; // 四舍五入
                    var anglerealNum = []; //实测平均回弹值Rm数组
                    var cgf = [];
                    var hh = [];
                    drawData.map((item) => {
                        var len = item.data.length;
                        var sum = 0;
                        for (var i = 0; i < len; i++) {
                            var num = item.data[i] - 0;
                            sum += num;
                        }
                        angleNum.push(sum / len);
                        anglerealNum.push(sum / len);
                        cgf.push((sum / len).toFixed(1));
                        hh.push((sum / len).toFixed(1));
                    });

                    anglerealNum.map((items, index) => {
                        // var num = "fParam" + (index + 1);
                        if (!isNaN(items)) {
                            this.contentTableLeft[index]['fParam17'] = items.toFixed(1);
                            this.reportResultData[0]['fResult' + (index + 1)] = items.toFixed(1);
                        } else {
                            this.contentTableLeft[index]['fParam17'] = "";
                            this.reportResultData[0]['fResult' + (index + 1)] = "";
                        }
                    })
                    var fParam17 = []
                    this.contentTableLeft.map(item => {
                        fParam17.push(item.fParam17)
                    })

                    this.contentTableResultData = data.checkConcretesampleresult.slice(0, 6); ////计算结果集合

                    this.calculationData(
                        anglerealNum,
                        this.contentTableResultData
                    );

                    if (data.fSampledates == null || data.fSampledates == '') {
                        this.formData.fTestuserid = this.userInfo.userId; //检测人id
                        this.formData.fTestusername = this.userInfo.realName; //检测人姓名
                        this.formData.fSampledates = this.common.getDay(0)
                        this.formData.fRecorddates = this.common.getDay(0); //记录时间
                        this.formData.fCheckdates = this.common.getDay(0); //复核时间
                    }
                    // data.fProjecttypename="解放军爱的疯狂骄傲的咖啡加速度快耐腐蚀的角度看复健科巅峰极速的军服的附件佳娜姐的纳税计算机爱上非奸即盗发件方塞缝加大设计房间爱附件暗示法"
                    // 记录表
                    this.recordTableObj.map(item => {
                        var name = item.value
                        item['key'] = data[name]
                    })
                    this.recordTableBottomObj.map(item => {
                        var name = item.value
                        item['key'] = data[name]
                    })
                    // 记录表
                    // 报告表

                    this.reportTableObj.map(item => {
                        var name = item.value
                        item['key'] = data[name]
                    })

                    this.reportTableBottomObj.map(item => {
                        var name = item.value
                        item['key'] = data[name]
                    })

                    // 报告表
                    if (this.formData.fRecorduserid != "" || this.formData.fRecorduserid != null) {
                        this.jlformData.fRecorduserid = this.formData.fRecorduserid //记录人id
                        this.jlformData.fRecordusername = this.formData.fRecordusername //记录人姓名
                    }

                    if (this.formData.fCheckuserid != "" || this.formData.fCheckuserid != null) {
                        this.jlformData.fCheckuserid = this.formData.fCheckuserid //记录人id
                        this.jlformData.fCheckusername = this.formData.fCheckusername //记录人姓名
                    }
                    if (this.statusNum == 3) {
                        this.jlformData.fJlcheckusername = this.userInfo.realName
                        this.jlformData.fJlcheckuserid = this.userInfo.userId
                        this.jlformData.fRecorddates = this.common.getDay(0)
                        this.jlformData.fCheckdates = this.common.getDay(0)
                        this.jlformData.fJlcheckdates = this.common.getDay(0)
                        this.jlformData.userName = this.userInfo.realName
                        this.jlformData.userId = this.userInfo.userId
                    }
                    if (data.fJlcheckdates != null && data.fJlcheckdates != '') {

                        this.jlformData = data;
                    }

                } else {
                    this.loading = false;
                    this.$message.error(res.msg);
                }
            });
        },
        getPerson(id) {
            var obj = {
                fCompanyid: id,
            };
            this.personList = []
            getBaseDepartmentUser(obj)
                .then((res) => {
                    if (res.errcode == 0) {

                        var arr = res.data.childList[0].personList;
                        var personList = [];

                        arr.map((item) => {
                            personList.push({
                                label: item.fRealname,
                                value: item.fUserid,
                            });

                        });
                        this.personList = personList

                    } else {
                        this.$message.error(res.msg);
                        return false;
                    }
                })

        },
        selectChange(e, statu) {
            if (statu == 0) {
                // 
                this.jlformData.fRecorduserid = e.value //记录人id
                this.jlformData.fRecordusername = e.label //记录人姓名
                this.formData.fRecorduserid = e.value //记录人id
                this.formData.fRecordusername = e.label //记录人姓名
            } else if (statu == 1) {
                this.jlformData.fCheckuserid = e.value //复核人id
                this.jlformData.fCheckusername = e.label //复核人姓名
                this.formData.fCheckuserid = e.value //复核人id
                this.formData.fCheckusername = e.label //复核人姓名
            }
            console.log(e, statu);
        },
        selectAngles() {
            //
            // console.log('检测角度(o)', this.RmData, this.formData.checkConcretesampleresult);
            this.calculationData(
                this.RmData,
                this.formData.checkConcretesampleresult
            );
        },
        // 回弹强度实测值
        getInfoData() {

            var data = this.contentTableLeft;

            var totalData = [];
            var checkname = [
                "fParam1",
                "fParam2",
                "fParam3",
                "fParam4",
                "fParam5",
                "fParam6",
                "fParam7",
                "fParam8",
                "fParam9",
                "fParam10",
                "fParam11",
                "fParam12",
                "fParam13",
                "fParam14",
                "fParam15",
                "fParam16",
            ];
            var alreadyData = []; //已填的测区
            for (var i = 0; i < data.length; i++) {
                for (var j = 0; j < checkname.length; j++) {
                    totalData.push(data[i].fId);
                    if (data[i][checkname[j]] != "") {
                        alreadyData.push(data[i].fId);
                    }
                }
            }
            var totalId = []; //所有测区Id
            data.map((item) => {
                totalId.push(item.fId);
            });
            var totalIdIndex = []; //已填测区 index
            totalId.map((item, index) => {
                alreadyData.map((i) => {
                    if (item == i) {
                        totalIdIndex.push(index);
                    }
                });
            });
            let newData = alreadyData.filter(
                (item, index) => alreadyData.indexOf(item) === index
            );

            this.formData.fTestnum = newData.length; // 实测数量(测区)
            this.reportTableBottomObj[1].key = newData.length; // 实测数量(测区)

            this.selecttTotalIdIndex = totalIdIndex; //已填测区 index

            var blankData = [];
            var rowData = []; //所有数据，不填补零
            var realArr = []; //每行真实数据
            for (var c = 0; c < data.length; c++) {
                var rowDeatil = [];
                var realData = []; //真实数据
                for (var h = 0; h < checkname.length; h++) {
                    if (data[c][checkname[h]] != "") {
                        rowDeatil.push(data[c][checkname[h]]);
                        realData.push(data[c][checkname[h]]);
                    } else {
                        blankData.push(c);
                        rowDeatil.push("0");
                        // realData.push('0')
                    }
                }

                rowData.push({
                    data: rowDeatil,
                });
                realArr.push({
                    data: realData,
                });
            }

            // 10个数，去掉三个最大数和三个最小数
            var drawData = []; // 10个数，去掉三个最大数和三个最小数
            for (var s = 0; s < realArr.length; s++) {
                // // 数组对象排序
                if (realArr[s].data.length == 16) {
                    var sortData = realArr[s].data.sort(function (a, b) {
                        return a - b;
                    });
                    drawData.push({
                        data: sortData.slice(3, 13),
                    });
                } else {
                    drawData.push({
                        data: realArr[s].data,
                    });
                }
            }
            // 10个数，去掉三个最大数和三个最小数
            // //实测平均回弹值Rm数组
            var angleNum = []; // 四舍五入
            var anglerealNum = []; //实测平均回弹值Rm数组
            var cgf = [];
            var hh = [];
            drawData.map((item) => {
                var len = item.data.length;
                var sum = 0;
                for (var i = 0; i < len; i++) {
                    var num = item.data[i] - 0;
                    sum += num;
                }
                angleNum.push(sum / len);
                anglerealNum.push(sum / len);
                cgf.push((sum / len).toFixed(1));
                hh.push((sum / len).toFixed(1));
            });

            anglerealNum.map((items, index) => {
                // var num = "fParam" + (index + 1);
                if (!isNaN(items)) {
                    data[index]['fParam17'] = items.toFixed(1);
                    this.reportResultData[0]['fResult' + (index + 1)] = items.toFixed(1);
                } else {
                    data[index]['fParam17'] = "";
                    this.reportResultData[0]['fResult' + (index + 1)] = "";
                }
            })
            var fParam17 = []
            data.map(item => {
                fParam17.push(item.fParam17)
            })

            // fParam17.map((item,index)=>{
            //     this.reportResultData[0]['fResult'+(index+1)]=item
            // })

            this.totalData.checkConcretesampleitems = data; //测区
            // this.totalData.checkConcretesampleresult.slice(0, 6); ////计算结果集合
            this.RmData = anglerealNum; //实测平均回弹值Rm

            this.calculationData(
                anglerealNum,
                this.contentTableResultData



            );
        },
        // 回弹计算
        calculationData(RmData, data) {



            var numData = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
            if (this.totalData.lrCheckConcreteSample.fDirection == "非水平方向") {
                // 遍历angleData,得到对应index
                var angleNumBer;
                // for (var i = 0; i < angleData.length; i++) {
                if (this.totalData.lrCheckConcreteSample.fAngle == "90°") {
                    angleNumBer = "0";
                } else if (this.totalData.lrCheckConcreteSample.fAngle == "60°") {
                    angleNumBer = "1";
                } else if (this.totalData.lrCheckConcreteSample.fAngle == "45°") {
                    angleNumBer = "2";
                } else if (this.totalData.lrCheckConcreteSample.fAngle == "30°") {
                    angleNumBer = "3";
                } else if (this.totalData.lrCheckConcreteSample.fAngle == "-30°") {
                    angleNumBer = "4";
                } else if (this.totalData.lrCheckConcreteSample.fAngle == "-45°") {
                    angleNumBer = "5";
                } else if (this.totalData.lrCheckConcreteSample.fAngle == "-60°") {
                    angleNumBer = "6";
                } else if (this.totalData.lrCheckConcreteSample.fAngle == "-90°") {
                    angleNumBer = "7";
                } else if (this.totalData.lrCheckConcreteSample.fAngle == "") {
                    angleNumBer = ""; //任务未填写角度，报错
                }
                // }
                // 处理实测平均回弹值Rm值
                // 大于等于20，小于等于50
                var angleList = [];
                var dc = [];
                console.log('RmData', RmData);
                for (var ii = 0; ii < RmData.length; ii++) {
                    if (RmData[ii] < 20) {
                        dc[ii] = 20;
                    } else if (RmData[ii] > 50) {
                        dc[ii] = 50;
                    } else if (RmData[ii] == "") {
                        dc[ii] = "";
                    } else {
                        dc[ii] = RmData[ii].toFixed(0);
                    }

                    // 对应平均回弹值的所有检测角度
                    angleList.push({
                        data: this.detectionList[dc[ii]],
                    });
                }

                // 根据对应的角度对应值及实测平均回弹值找检测角度回弹值修正值
                var corrected = []; //检测角度回弹值修正值
                for (var j = 0; j < angleList.length; j++) {
                    var ff;
                    if (angleList[j].data != undefined) {
                        for (var ih = 0; ih < angleList[j].data.length; ih++) {
                            ff = angleList[j].data;
                        }
                        corrected.push(ff[angleNumBer]);
                    } else {
                        corrected.push("");
                    }
                }

                // 将检测角度回弹值修正值插入this.formData.checkConcretesampleresult数组
                corrected.map((item, i) => {
                    var num = "fResult" + (i + 1);
                    if (item != "") {
                        this.contentTableResultData[1][num] = item;
                        this.reportResultData[1]['fResult' + (i + 1)] = item;
                    } else {
                        this.contentTableResultData[1][num] = "";
                        this.reportResultData[1]['fResult' + (i + 1)] = "";
                    }
                });
                // 检测角度回弹值修正值
                // 三、检测角度修正后回弹值
                var reviseAngleNum = [];
                RmData.map((item, i) => {
                    var num = "fResult" + (i + 1);
                    if (!isNaN(item)) {

                        reviseAngleNum.push(item - 0 + (corrected[i] - 0));
                        this.contentTableResultData[2][num] = (
                            item -
                            0 +
                            (corrected[i] - 0)
                        ).toFixed(1);


                    } else {
                        reviseAngleNum.push("");
                        this.contentTableResultData[2][num] = "";
                    }
                });
                this.reportResultData[2] = this.contentTableResultData[2];


                // 检测角度修正后回弹值
                //  四、浇筑面回弹值修正值
                var PouringSurfaceFalg;
                if (this.formData.fSurface == "表面") {
                    PouringSurfaceFalg = 0;
                } else {
                    PouringSurfaceFalg = 1;
                }
                var reviseAngleNums = [];
                var PouringSurfaceList = [];
                for (var iv = 0; iv < reviseAngleNum.length; iv++) {
                    if (reviseAngleNum[iv] != "") {
                        if (reviseAngleNum[iv] < 20) {
                            reviseAngleNums[iv] = 20;
                        } else if (reviseAngleNum[iv] > 50) {
                            reviseAngleNums[iv] = 50;
                        } else {
                            reviseAngleNums[iv] = (reviseAngleNum[iv] - 0).toFixed(0);
                        }
                    } else {
                        reviseAngleNums[iv] = "";
                    }
                    // 对应检测角度修正后回弹值的浇筑面回弹值修正值
                    PouringSurfaceList.push({
                        data: this.surfaceList[reviseAngleNums[iv]],
                    });
                }
                var PouringSurface = []; //检测角度回弹值修正值
                for (var jj = 0; jj < PouringSurfaceList.length; jj++) {
                    var ll;
                    if (PouringSurfaceList[jj].data != undefined) {
                        for (var iu = 0; iu < PouringSurfaceList[jj].data.length; iu++) {
                            ll = PouringSurfaceList[jj].data;
                        }
                        PouringSurface.push(ll[PouringSurfaceFalg]);
                    } else {
                        PouringSurface.push("");
                    }
                }


                // 将浇筑面回弹值修正值插入this.formData.checkConcretesampleresult数组
                PouringSurface.map((item, i) => {
                    var num = "fResult" + (i + 1);
                    if (item != "") {
                        this.contentTableResultData[3][num] = item;
                    } else {
                        this.contentTableResultData[3][num] = "";

                    }
                });
                this.reportResultData[3] = this.contentTableResultData[3];

                // 浇筑面回弹值修正值


                // 五、修正后回弹平均值
                var modifiedMean = [];
                reviseAngleNum.map((item, i) => {
                    var num = "fResult" + (i + 1);
                    if (item != "") {
                        modifiedMean.push((item - 0 + (PouringSurface[i] - 0)).toFixed(1));
                        this.contentTableResultData[4][num] = (
                            item -
                            0 +
                            (PouringSurface[i] - 0)
                        ).toFixed(1);
                    } else {
                        this.contentTableResultData[4][num] = "";
                        modifiedMean.push("");
                    }
                });
                this.reportResultData[4] = this.contentTableResultData[4];

                // 五、修正后回弹平均值
                // 浇筑面回弹值修正值
            } else if (this.totalData.lrCheckConcreteSample.fDirection == "水平方向") {
                console.log(88888, RmData);
                RmData.map((item, i) => {
                    var num = "fResult" + (i + 1);
                    if (!isNaN(item)) {
                        console.log('ooopp', item);
                        // 浇筑面修正值
                        this.contentTableResultData[4][num] = (item - 0).toFixed(1);
                    }
                    this.contentTableResultData[1][num] = ""; //角度修正值
                    this.contentTableResultData[2][num] = ""; //角度修正后回弹值
                    this.contentTableResultData[3][num] = ""; //检测面修正值
                });
                this.reportResultData[1] = this.contentTableResultData[1];
                this.reportResultData[2] = this.contentTableResultData[2];
                this.reportResultData[3] = this.contentTableResultData[3];
                this.reportResultData[4] = this.contentTableResultData[4];

            }

            // 六、碳化深度dm(mm)
            //七 强度换算值(MPa)
            var Carbonizationdepth = [];
            numData.map((item, i) => {
                var num = "fResult" + (i + 1);

                Carbonizationdepth.push(data[0][num]);
            });

            var reallCarbonizationdepth = [];
            var reallCarbonizationv = [];
            RmData.map((item, index) => {
                //获取有实测平均回弹值Rm，且碳化深度dm(mm)不为空的数据
                if (!isNaN(item)) {
                    reallCarbonizationdepth.push(Carbonizationdepth[index]);
                    reallCarbonizationv.push(Carbonizationdepth[index]);
                } else {
                    reallCarbonizationdepth.push("");
                }
            });
            var carbonationDepthNumBer = [];
            for (var ir = 0; ir < reallCarbonizationdepth.length; ir++) {
                if (reallCarbonizationdepth[ir] == "/") {
                    carbonationDepthNumBer.push("0");
                } else if (reallCarbonizationdepth[ir] == "0.0") {
                    carbonationDepthNumBer.push("0");
                } else if (reallCarbonizationdepth[ir] == "0.5") {
                    carbonationDepthNumBer.push("1");
                } else if (reallCarbonizationdepth[ir] == "1.0") {
                    carbonationDepthNumBer.push("2");
                } else if (reallCarbonizationdepth[ir] == "1.5") {
                    carbonationDepthNumBer.push("3");
                } else if (reallCarbonizationdepth[ir] == "2.0") {
                    carbonationDepthNumBer.push("4");
                } else if (reallCarbonizationdepth[ir] == "2.5") {
                    carbonationDepthNumBer.push("5");
                } else if (reallCarbonizationdepth[ir] == "3.0") {
                    carbonationDepthNumBer.push("6");
                } else if (reallCarbonizationdepth[ir] == "3.5") {
                    carbonationDepthNumBer.push("7");
                } else if (reallCarbonizationdepth[ir] == "4.0") {
                    carbonationDepthNumBer.push("8");
                } else if (reallCarbonizationdepth[ir] == "4.5") {
                    carbonationDepthNumBer.push("9");
                } else if (reallCarbonizationdepth[ir] == "5.0") {
                    carbonationDepthNumBer.push("10");
                } else if (reallCarbonizationdepth[ir] == "5.5") {
                    carbonationDepthNumBer.push("11");
                } else if (reallCarbonizationdepth[ir] == "≥6.0") {
                    carbonationDepthNumBer.push("12");
                } else if (reallCarbonizationdepth[ir] == "") {
                    carbonationDepthNumBer.push("");
                }
            }

            // 判断测区强度换算表，
            var AverageArr = []; //修正后回弹平均值
            numData.map((item, i) => {
                var num = "fResult" + (i + 1);
                AverageArr.push(this.contentTableResultData[4][num]);
            });
            var newAverageArr = []; //修正后回弹平均值(修正值自我)
            var correctedAveraged = []; //强度换算值(MPa)数组
            var correctedAveragedData = [];
            if (this.formData.fConcretetype == "泵送混凝土") {
                // 大于等于18.6，小于等于52.8
                var correctedAverageList = [];
                for (var id = 0; id < AverageArr.length; id++) {
                    if (AverageArr[id] != "") {
                        if (AverageArr[id] - 0 < 18.6) {
                            newAverageArr[id] = 18.6;
                        } else if (AverageArr[id] - 0 > 52.8) {
                            newAverageArr[id] = 52.8;
                        } else {
                            newAverageArr[id] = (AverageArr[id] - 0).toFixed(1);
                        }
                    } else {
                        newAverageArr[id] = "";
                    }
                    // 对应平均回弹值的所有换算强度
                    correctedAverageList.push({
                        data: this.concretetypeList[newAverageArr[id]],
                    });
                }
                for (var jb = 0; jb < correctedAverageList.length; jb++) {
                    var vf;
                    if (correctedAverageList[jb].data != undefined) {
                        for (var ik = 0; ik < correctedAverageList[jb].data.length; ik++) {
                            vf = correctedAverageList[jb].data;
                        }
                        if (vf[carbonationDepthNumBer[jb]] != undefined) {
                            correctedAveraged.push(vf[carbonationDepthNumBer[jb]]);
                            correctedAveragedData.push(vf[carbonationDepthNumBer[jb]]);
                        } else {
                            correctedAveraged.push("");
                            correctedAveragedData.push("");
                        }
                    } else {
                        correctedAveraged.push("");
                        correctedAveragedData.push("");
                    }
                }
                correctedAveraged.map((item, i) => {
                    var num = "fResult" + (i + 1);
                    if (item != "") {
                        this.contentTableResultData[5][num] = item;
                    } else {
                        this.contentTableResultData[5][num] = "";

                    }
                });
                this.reportResultData[5] = this.contentTableResultData[5];

            } else if (this.formData.fConcretetype == "非泵送混凝土") {
                // 大于等于20.0，小于等于50.0
                var correctedAverageLists = [];
                for (var ids = 0; ids < AverageArr.length; ids++) {
                    if (AverageArr[ids] != "") {
                        if (AverageArr[ids] < 20.0) {
                            newAverageArr[ids] = "20.0";
                        } else if (AverageArr[ids] > 50.0) {
                            newAverageArr[ids] = "50.0";
                        } else {
                            newAverageArr[ids] = AverageArr[ids];
                        }
                    } else {
                        newAverageArr[ids] = "";
                    }
                    correctedAverageLists.push({
                        data: this.concretetypeunList[newAverageArr[ids]],
                    });
                }

                for (var jr = 0; jr < correctedAverageLists.length; jr++) {
                    var vfs;
                    if (correctedAverageLists[jr].data != undefined) {
                        for (var io = 0; io < correctedAverageLists[jr].data.length; io++) {
                            vfs = correctedAverageLists[jr].data;
                        }
                        if (vfs[carbonationDepthNumBer[jr]] != undefined) {
                            correctedAveraged.push(vfs[carbonationDepthNumBer[jr]]);
                            correctedAveragedData.push(vfs[carbonationDepthNumBer[jr]]);
                        } else {
                            correctedAveraged.push("");
                            correctedAveragedData.push("");
                        }
                    } else {
                        correctedAveraged.push("");
                        correctedAveragedData.push("");
                    }
                }
                correctedAveraged.map((item, i) => {
                    var num = "fResult" + (i + 1);
                    if (item != "") {
                        this.contentTableResultData[5][num] = item;
                    } else {
                        this.contentTableResultData[5][num] = "";

                    }
                });

                this.reportResultData[5] = this.contentTableResultData[5];


            }
            if (this.formData.fTestnum > 0) {
                // 最小值
                var minData = []
                numData.map((item, i) => {
                    var num = "fResult" + (i + 1);
                    if (this.contentTableResultData[5][num] != "") {
                        minData.push(this.contentTableResultData[5][num]);
                    }
                });



                var minArr = []
                var sg = 0;
                minData.map(item => {
                    // .includes("<")||item.includes(">") 
                    if (item == '<10') {

                        sg = 1
                        this.formData.fMin = item
                        this.recordTableBottomObj[0].key = item
                        return false
                    } else {
                        if (sg == 0) {
                            if (item.includes("<") || item.includes(">")) {
                                minArr.push(item.slice(1));
                            } else {
                                minArr.push(item);
                            }
                            this.formData.fMin = Math.min(...minArr)
                            this.recordTableBottomObj[0].key = Math.min(...minArr)
                        }




                    }
                })


                // 最小值
                // 强度平均值

                var flag = 0;

                if (minData.length > 0) {


                    var AreaNum = []
                    // minData.map(item => {
                    //     if (item == '>60') {
                    //         flag = 1
                    //         AreaNum.push(60)
                    //     } else if (item == '<10') {
                    //         flag = 1
                    //         AreaNum.push(10)
                    //     } else {
                    //         AreaNum.push(item)
                    //     }
                    // })
                    minData.map((item) => {
                        if (item != ">60" && item != "<10") {
                            AreaNum.push(item);
                        }
                    });


                    var qualifiednum = []
                    AreaNum.map(item => {
                        if ((item - 0) >= (this.formData.fConcretelevel.slice(1) - 0)) {
                            qualifiednum.push(item)
                        }
                    })
                    var maxNum = 0;
                    minData.map(item => {
                        if (item == ">60") {
                            maxNum++;
                            if (maxNum == minData.length) {
                                this.formData.fAvg = "/";
                                this.recordTableBottomObj[1].key = "/";
                                this.reportTableBottomObj[0].key = "/";
                            } else {
                                var sum = AreaNum.reduce((total, num) => (total - 0) + (num - 0), 0)
                                this.formData.fAvg = (sum / AreaNum.length).toFixed(1);
                                this.recordTableBottomObj[1].key = (sum / AreaNum.length).toFixed(1);
                                this.reportTableBottomObj[0].key = (sum / AreaNum.length).toFixed(1);
                            }
                        }
                    })
                    this.formData.fQualifiednum = qualifiednum.length

                } else {
                    // 强度平均值(Mpa)
                    this.formData.fAvg = '';
                    this.recordTableBottomObj[1].key = '';
                    this.reportTableBottomObj[0].key = '';
                }
                // 强度平均值
                // 强度换算值(MPa)
                // 碳化深度dm(mm)
                var correctedAveragedNum = []; //处理强度换算值
                for (var ig = 0; ig < correctedAveragedData.length; ig++) {

                    var str = correctedAveragedData[ig].replace(/[^\d.]/gi, "");
                    correctedAveragedNum.push(str);
                }

                var correctedAveragedNumber = 0;
                for (var i = 0; i < correctedAveragedNum.length; i++) {
                    var num = correctedAveragedNum[i];
                    correctedAveragedNumber += num - 0;
                }

                var correctedGetData = [];
                correctedAveragedNum.map((item) => {
                    if (item != "") {
                        correctedGetData.push(item);
                    }
                });
                var strengthConversionAverage; // 强度换算值平均值
                if (correctedGetData.length != 0) {
                    strengthConversionAverage =
                        correctedAveragedNumber / correctedGetData.length; // 强度换算值平均值
                } else {
                    strengthConversionAverage = 0;
                }
                //  强度换算值方差
                var strengthConversionNum = 0;
                // // 强度换算值减去强度换算值平均值 的平方

                for (var ie = 0; ie < correctedGetData.length; ie++) {
                    if (correctedGetData[ie] != "") {
                        strengthConversionNum += Math.pow(
                            correctedGetData[ie] - 0 - strengthConversionAverage.toFixed(2),
                            2
                        );
                    }
                }

                const filtered = reallCarbonizationv.filter((item) => {
                    return item !== null && typeof item !== "undefined" && item !== "";
                });

                if (filtered.length != 0) {
                    // 碳化深度dm(mm)数组不为空时
                    var strengthAveraged = 0;
                    if (correctedGetData.length != 0 && correctedGetData.length != 1) {
                        strengthAveraged =
                            strengthConversionNum / (correctedGetData.length - 1);
                    }
                    var strengthAveragedNum = Math.sqrt(strengthAveraged);
                    this.formData.fStandarddeviation = strengthAveragedNum.toFixed(2);
                    this.recordTableBottomObj[2].key = strengthAveragedNum.toFixed(2);
                    this.reportTableBottomObj[2].key = strengthAveragedNum.toFixed(2);
                    //  强度换算值方差
                    // 混凝土强度推定值(MPa)
                    var one = correctedGetData[0];
                    for (var ifn = 1; ifn < correctedGetData.length; ifn++) {
                        one = Math.min(one, correctedGetData[ifn]);
                    }
                    var max = 0;
                    if (flag == 0) {

                        minData.map((item) => {
                            if ((this.formData.fTestnum - 0) < 10) {
                                // this.formData.fConcreteresult = one + "Mpa";
                                // this.formData.fConcreteresult = correctedGetData[0];
                                // for (var ifn = 1; ifn < correctedGetData.length; ifn++) {
                                //     this.formData.fConcreteresult = Math.min(
                                //         this.formData.fConcreteresult,
                                //         correctedGetData[ifn]
                                //     );
                                // }
                                var Concreteresult = one
                                if ((Concreteresult - 0) >= (this.formData.fConcretelevel.slice(1) - 0)) {
                                    this.reportTableBottomObj[4].key = "合格"
                                    // 改构件回弹强度推定值>50Mpa,符合设计图纸要求。
                                    this.formData.fTestresult = "经检测，该构件回弹强度推定值>" +
                                        this.formData.fConcretelevel +
                                        ",符合设计图纸要求。"
                                } else {
                                    this.reportTableBottomObj[4].key = "不合格"
                                    this.formData.fTestresult = "经检测，该构件回弹强度推定值" +
                                        Concreteresult +
                                        "Mpa,不符合设计图纸要求。"
                                }
                                // this.formData.fTestresult

                                this.formData.fIstrue = this.reportTableBottomObj[4].key
                                // fTestresult 
                                this.formData.fConcreteresult = one + "Mpa";
                                //    记录表
                                this.recordTableBottomObj[3].key = one + "Mpa";
                                // 报告
                                this.reportTableBottomObj[3].key = one + "Mpa";

                            } else if ((this.formData.fTestnum - 0) >= 10) {

                                //当构件测区不少于10个时
                                this.formData.fConcreteresult =
                                    (
                                        strengthConversionAverage -
                                        this.formData.fStandarddeviation * 1.645
                                    ).toFixed(1) + "Mpa";

                                var Concreteresult1 =
                                    (
                                        strengthConversionAverage -
                                        this.formData.fStandarddeviation * 1.645
                                    ).toFixed(1)

                                if ((Concreteresult1 - 0) >= (this.formData.fConcretelevel.slice(1) - 0)) {
                                    this.reportTableBottomObj[4].key = "合格"
                                    // 改构件回弹强度推定值>50Mpa,符合设计图纸要求。
                                    this.formData.fTestresult = "经检测，该构件回弹强度推定值>" +
                                        this.formData.fConcretelevel +
                                        ",符合设计图纸要求。"
                                } else {
                                    this.reportTableBottomObj[4].key = "不合格"
                                    this.formData.fTestresult = "经检测，该构件回弹强度推定值" +
                                        Concreteresult1 +
                                        "Mpa,不符合设计图纸要求。"
                                }
                                this.formData.fIstrue = this.reportTableBottomObj[4].key
                                //    记录表
                                this.recordTableBottomObj[3].key = this.formData.fConcreteresult;
                                // 报告
                                this.reportTableBottomObj[3].key = this.formData.fConcreteresult;
                            }

                            if (item == "<10") {
                                this.formData.fConcreteresult = "<10.0Mpa"; //当构件的测区强度值中有小于10.0MPa时
                                this.reportTableBottomObj[4].key = "不合格"
                                this.formData.fTestresult = "经检测，该构件回弹强度推定值<10.0Mpa,不符合设计图纸要求。"
                                //    记录表
                                this.recordTableBottomObj[3].key = "<10.0Mpa";
                                // 报告
                                this.reportTableBottomObj[3].key = "<10.0Mpa";
                            } else if (item == ">60") {
                                max++;
                                if (max == minData.length) {
                                    this.formData.fConcreteresult = ">60.0Mpa";
                                    this.reportTableBottomObj[4].key = "不合格"
                                    this.formData.fTestresult = "经检测，该构件回弹强度推定值>60Mpa,不符合设计图纸要求。"
                                } else {
                                    this.formData.fConcreteresult = one + "Mpa";
                                    if ((one - 0) >= (this.formData.fConcretelevel.slice(1) - 0)) {
                                        this.reportTableBottomObj[4].key = "合格"
                                        // 改构件回弹强度推定值>50Mpa,符合设计图纸要求。
                                        this.formData.fTestresult = "经检测，该构件回弹强度推定值>" +
                                            this.formData.fConcretelevel +
                                            ",符合设计图纸要求。"
                                    } else {
                                        this.reportTableBottomObj[4].key = "不合格"
                                        this.formData.fTestresult = "经检测，该构件回弹强度推定值" +
                                            one +
                                            "Mpa,不符合设计图纸要求。"
                                    }
                                    //    记录表
                                    this.recordTableBottomObj[3].key = one + "Mpa";
                                    // 报告
                                    this.reportTableBottomObj[3].key = one + "Mpa";
                                }
                                if (minData.length == 1) {
                                    this.formData.fConcreteresult = ">60.0Mpa";
                                    this.reportTableBottomObj[4].key = "不合格"
                                    this.formData.fTestresult = "经检测，该构件回弹强度推定值>60Mpa,不符合设计图纸要求。"
                                }


                            } else if (
                                item != "<10" &&
                                item < "10" &&
                                item != ">60" &&
                                item < "10"
                            ) {
                                this.formData.fConcreteresult = "<10.0Mpa"; //当构件的测区强度值中有小于10.0MPa时
                                this.reportTableBottomObj[4].key = "不合格"
                                this.formData.fTestresult = "经检测，该构件回弹强度推定值<10.0Mpa,不符合设计图纸要求。"
                                //    记录表
                                this.recordTableBottomObj[3].key = "<10.0Mpa";
                                // 报告
                                this.reportTableBottomObj[3].key = "<10.0Mpa";
                            }

                        })

                    } else {
                        this.formData.fConcreteresult = "<10.0Mpa"; //当构件的测区强度值中有小于10.0MPa时
                        var Concreteresult2 = 10.0
                        if ((Concreteresult2 - 0) >= (this.formData.fConcretelevel.slice(1) - 0)) {
                            this.reportTableBottomObj[4].key = "合格"
                            // 改构件回弹强度推定值>50Mpa,符合设计图纸要求。
                            this.formData.fTestresult = "经检测，该构件回弹强度推定值>" +
                                this.formData.fConcretelevel +
                                ",符合设计图纸要求。"
                        } else {
                            this.reportTableBottomObj[4].key = "不合格"
                            this.formData.fTestresult = "经检测，该构件回弹强度推定值" +
                                Concreteresult2 +
                                "Mpa,不符合设计图纸要求。"
                        }
                        this.formData.fIstrue = this.reportTableBottomObj[4].key
                        //  记录表
                        this.recordTableBottomObj[3].key = this.formData.fConcreteresult;
                        // 报告
                        this.reportTableBottomObj[3].key = this.formData.fConcreteresult;
                    }

                }



            } else {
                // 最小值
                this.formData.fMin = "";
                this.recordTableBottomObj[0].key = ""

                // 强度标准差(Mpa)
                this.formData.fStandarddeviation = "";
                this.recordTableBottomObj[2].key = "";
                this.reportTableBottomObj[2].key = "";

                // 强度推定值Rn(MPa)
                this.formData.fConcreteresult = "";
                //    记录表
                this.recordTableBottomObj[3].key = this.formData.fConcreteresult;
                // 报告
                this.reportTableBottomObj[3].key = this.formData.fConcreteresult;


                this.reportTableBottomObj[4].key = ""
                // 改构件回弹强度推定值>50Mpa,符合设计图纸要求。
                this.formData.fTestresult = ""
            }

            // if (this.formData.fIssend == null) {
            //     this.yj_saveForm();
            // }

        },
        // submitFormSample(data) {
        //     saveConcreteChecksample(data).then((res) => {
        //       if (res.errcode == 0) {
        //         console.log("保存成功");
        //       } else {
        //         this.$message.error(res.msg);
        //       }
        //     });
        //   },
        yj_saveForm() {
            // 0连续新增1新增

            if (this.currentDetail.fStatus == '审核中') {
                this.jlformData.fId = this.formData.fId

                if ((this.jlformData.fRecorduserid != "" && this.jlformData.fRecorduserid != null) && (this.jlformData.fCheckuserid != "" && this.jlformData.fCheckuserid != null)) {



                    saveConcreteCheckAduit(this.jlformData)
                        .then((res) => {
                            if (res.errcode == 0) {
                                this.loading = false;
                                this.visible = false;
                                this.$emit("refreshList", status);
                                this.$message.success("新增成功");
                                this.isLock = false
                            } else {
                                this.loading = false;
                                this.isLock = false
                                this.$message.error(res.data);
                                console.log("接口报错");
                            }
                        })
                        .catch((error) => {
                            console.log("新增）", error);
                        });
                } else {
                    this.$message.warning("请选择记录人或复核人");
                }
            } else {
                this.formData.fCompanyid = this.userInfo.companyId
                this.formData.fCompanyname = this.userInfo.companyName
                this.formData.userId = this.userInfo.userId; //当前登录人id
                this.formData.userName = this.userInfo.realName; //当前登录人名称
                if (this.formData.fTestnum > 0) {
                    this.loading = true;
                    this.isLock = true

                    saveConcreteCheckSample(this.formData)
                        .then((res) => {
                            if (res.errcode == 0) {
                                this.loading = false;
                                this.visible = false;
                                this.$emit("refreshList", status);
                                this.$message.success("新增成功");
                                this.isLock = false
                            } else {
                                this.loading = false;
                                this.isLock = false
                                this.$message.error(res.data);
                                console.log("接口报错");
                            }
                        })
                        .catch((error) => {
                            console.log("新增）", error);
                        });
                } else {
                    this.$message.warning("请至少填写一组测点");
                }
            }

        },

    },
};